﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace CNav.Common.Support
{
   public static class XmlUtil
    {
       public static string Serialize<T>(T obj)
       {
           XmlSerializer ser = new XmlSerializer(typeof(T));
           StringWriter writer = new StringWriter();
           ser.Serialize(writer, obj);
           return writer.ToString();
       }
    }
}
